package com.huawei.crm.sample.domain.order.event;

import com.huawei.crm.sample.domain.order.model.aggragate.Order;

public class OrderCreatedEvent {
    private final Order order;

    public OrderCreatedEvent(Order order) {
        this.order = order;
    }

    public Order getOrder() {
        return order;
    }

    // 简单静态发布方法（实际应由事件总线处理）
    public static void publish(Order order) {
        // TODO: 事件发布逻辑
        // 这里只是示例，实际应注入事件发布器
        System.out.println("[DomainEvent] OrderCreatedEvent: " + order.getOrderId());
    }
} 